/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bllobjects;

import java.io.Serializable;

/**
 *
 * @author salm
 */
public class Account implements Serializable
{
    private long exp;
    private int level;
    private String typeID;
    private String userID;
    private String userName;
    
    public Account(String id, String name, long exp, int lvl, String typeID)
    {
        this.exp = exp;
        this.level = lvl;
        this.typeID = typeID;
        this.userID = id;
        this.userName = name;
    }

    public long getExp() {
        return exp;
    }

    public int getLevel() {
        return level;
    }

    public String getTypeID() {
        return this.typeID;
    }

    /**
     * @return the userID
     */
    public String getUserID(){
        return userID;
    }

    /**
     * @return the userName
     */
    public String getUserName(){
        return userName;
    }

    public void increaseExp(long incExp)
    {
        exp += incExp;
    }

    /**
     * @param typeID the typeID to set
     */
    public void setTypeID(String typeID) {
        this.typeID = typeID;
    }

    /**
     * @param userID the userID to set
     */
    public void setUserID(String userID) {
        this.userID = userID;
    }

    /**
     * @param userName the userName to set
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }
    
    public String getDescription()
    {
        return String.format("Name: %s -- Experience: %d -- Level: %d", this.userName, this.exp, this.level);
    }
    
    @Override
    public String toString()
    {
        return this.userName;
    }
}